Hello Meir,
you are mixing Batch and Powershell Syntax. This example should never throw an error:
# Get list of files to move
$list = Get-Content "c:\3.txt" -ErrorAction 'SilentlyContinue'
# Set the target destination
$dest = "C:\Users\" + $env:UserName + "\Documents\Outlook Files\"
# For each line in the list, do
foreach ($line in $list)
{
# Move file to destination. The try/catch block is because when copying from older SMB versions 'SilentlyContinue' won't always work as untended.
try { Move-Item -Path $line -Destination $dest -Force -Confirm:$false -ErrorAction 'Stop' }
catch { }
}
See the comments for what each step does (and especially the one in the loop - that one is an oddball issue that just is).
Cheers,
Fred